package cn.lkp.mall.authserver.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MallWebConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        //由于要实现功能：登陆过再点击登陆直接跳转到首页，因此不用路径映射
        //registry.addViewController("/login.html").setViewName("login");
        //可以使用路径映射，跳转到注册页
        registry.addViewController("/register.html").setViewName("register");
    }
}
